{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->
		{include admin.inc.menu}
		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<!-- page breadcrumb start-->
				{include admin.inc.bread}
				<!-- page "breadcrumb end-->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">

					<li><a href="javascript:void(0)" id="add-node"><i class="glyphicon glyphicon-plus"></i> 添加权限</a></li>
					<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-th-list"></i> 权限表列</a></li>
					<!--<li><a href="/admin/index/edit"><i class="glyphicon glyphicon-edit"></i> 编辑权限</a></li>-->

				</ul>
				<div class="inner-container">
					<form class="form-inline search-form" role="form">
						<input type="hidden" name="pagesize" value="{$pagesize}" >
						<!-- search form start -->
						<!--tmpl-search-->

						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
								权限名称
								</div>
								<input type="text" class="form-control input-sm" maxlength="50" placeholder="" name="s_name" value="{$s_name}">
							</div>
						</div>
						
						<!-- searchinput -->
						<!-- <div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
								
								</div>
								<input type="text" class="form-control input-sm" maxlength="50" placeholder="" name="s_node_key" value="{$s_node_key}">
							</div>
						</div>
						-->
						<input type="hidden" name="order" value="{$order}">
						<button type="submit" class="btn btn-sm btn-success">搜索</button>
						<!-- search form end -->
					</form>
					<form id="J_List_Form">
						<div class="table-responsive">
							<table id="J_ListTable" class="table  table-hover  table-striped">
								<!--tmpl-listtable-->

								<!-- listblock -->
								<thead>
									<tr>
										<th width="20"><input type="checkbox" class="icheck check-all" /></th>
										<!--tmpl-fieldheaders-->
								
										<th>权限名称<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="name ASC"}name DESC{else}name ASC{/if}' class='fa ofield {if $order=="name ASC"}fa-chevron-up{elseif $order=="name DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>权限标识<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="node_key ASC"}node_key DESC{else}node_key ASC{/if}' class='fa ofield {if $order=="node_key ASC"}fa-chevron-up{elseif $order=="node_key DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>备注<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="remark ASC"}remark DESC{else}remark ASC{/if}' class='fa ofield {if $order=="remark ASC"}fa-chevron-up{elseif $order=="remark DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>添加时间<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="addtime ASC"}addtime DESC{else}addtime ASC{/if}' class='fa ofield {if $order=="addtime ASC"}fa-chevron-up{elseif $order=="addtime DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>修改时间<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="edittime ASC"}edittime DESC{else}edittime ASC{/if}' class='fa ofield {if $order=="edittime ASC"}fa-chevron-up{elseif $order=="edittime DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
								
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td style="text-align:center;" colspan="6" class="empty-table-td">{$emptyRecord}</td>
								</tr>
								{/if}
								{loop $items $value}
								<tr>
									<td><input type="checkbox" class="icheck" name="ids[]" value="{$value[id]}"/></td>
									<!--tmpl-fieldlist-->
								
									<td data-id='{$value[id]}'>{$value[name]}</td>
									<td>{$value[node_key]}</td>
									<td>{$value[remark]}</td>
									<td>{$value[addtime]}</td>
									<td>{$value[edittime]}</td>
									<!-- <td>{$value[admin_manager_id]}</td>
									<td>{$value[del_status]}</td>
									<td>{$value[app_id]}</td> -->
								
									<td>
										<!--tmpl-listbtn-->
								
										<!-- listbtnedit -->
										{if in_array('admin/node/edit',$priv) || empty($priv)}
										<a href="javascript:void(0);" data-id="{$value[id]}" class="btn btn-primary js-edit btn-xs">
											<i class="glyphicon glyphicon-edit"></i> 编辑</a>
										{/if}
										
										<!-- listbtndelete -->
										{if in_array('admin/node/delete',$priv) || empty($priv)}
										<a href="{$delete_url}?id={$value[id]}" class="btn btn-danger btn-xs item-remove">
											<i class="glyphicon glyphicon-trash"></i> 删除</a>
										{/if}
										
								
									</td>
								</tr>
								{/loop}
								

							</table>

						</div>
						
					</form>
					<div class="text-right">
						{$pagemenu}
					</div>

				</div>
			</div>
		</section>
	</div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->

<!-- assoclist -->
<!-- template -->
<script id="editpanel" type="text/html">
<form role="form" class="content-add-form" id="content-add-form" autocomplete="off">

						<!--tmpl-fields-->
						<input type="hidden" name="id" value="{[id]}">

						<!-- input -->
						<div class="form-group">
							<label >
								<span class="asterisk">*</span>
								权限名称
							</label>
							<input  dtype="" class="form-control" maxlength="50" name="data[name]" placeholder="" required cname="" value="{[name]}" />
						</div>
						<p class="help-block"></p>

						<!-- input -->
						<div class="form-group">
							<label > 
								<span class="asterisk">*</span>
								权限标识
							</label>
							<input  dtype="" class="form-control" maxlength="50" name="data[node_key]" placeholder="" required cname="" value="{[node_key]}" />
						</div>
						<p class="help-block"></p>

						<!-- textarea -->
						<div class="form-group">
							<label>
								备注
							</label>
							<textarea class="form-control" maxlength="255" name="data[remark]" placeholder="" cname="">{[remark]}</textarea>
						</div>
						<p class="help-block"></p>

					</form><!-- content add form -->
</script>

<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/admin_nodeindex",function (parameter){
		
		/**--tmpl-templatejavascript--**/
		
		<!--tmpl-templatejavascript-->

		parameter.admin_role_assoc_url="{$admin_role_assoc_url}";

		parameter.detailUrl="{$detail_url}";
		parameter.deleteUrl="{$delete_url}";
		parameter.editUrl="{$do_edit_url}";
		parameter.addUrl = "{$do_add_url}";
		parameter.upload_url="{$upload_url}";
		parameter.image_search_url="{$image_search_url}";
		parameter.image_list_url="{$image_list_url}";
		
		parameter.init();		
	});
</script>
</body>
</html>
